<template>
  <div class="mainProblems">
    <van-nav-bar
      title="常见问题"
      left-text=""
      left-arrow
      @click-left="onClickLeft"
    />
    <el-collapse accordion>
      <el-collapse-item v-for="(i, index) in problemList" :key="index">
        <template slot="title">
          <i class="header-icon el-icon-info" id="icon"></i>{{ i.problem }}
        </template>
        <div>
          {{ i.answer }}
        </div>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
export default {
  name: "Problems",
  components: {},
  data() {
    return {
      backAddr: "/community",
      title: "常见问题",
      problemList: [
        {
          problem: "在哪里申请举办比赛？",
          answer: "网上提出申请",
        },
        {
          problem: "在哪里申请举办比赛？",
          answer: "网上提出申请",
        },
        {
          problem: "在哪里申请举办比赛？",
          answer: "网上提出申请",
        },
        {
          problem: "在哪里申请举办比赛？",
          answer: "网上提出申请",
        },
        {
          problem: "在哪里申请举办比赛？",
          answer: "网上提出申请",
        },
        {
          problem: "在哪里申请举办比赛？",
          answer: "网上提出申请",
        },
      ],
    };
  },
  methods: {
    onClickLeft() {
      this.$router.push({ path: this.backAddr });
    },
  },
};
</script>
<style lang="scss">
.mainProblems {
  width: 375px;
  margin: 0;
}
#icon {
  margin: 0px 10px 0px 10px;
}
.van-nav-bar {
  background-color: #64b587;

  .van-nav-bar__title {
    color: white;
    font-weight: bold;
  }
  .van-icon {
    color: white;
  }
}
</style>